package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.Normal;
import com.ruoyi.system.mapper.NormalMapper;
import com.ruoyi.system.service.NormalService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: ruohao
 * @Date: 2023/9/5
 **/
@Service
public class NormalServiceImpl implements NormalService {
    @Resource
    private NormalMapper normalMapper;

    @Override
    public List<Normal> selectList(Normal normal) {
        return normalMapper.selectList(normal);
    }

    @Override
    public List<Normal> selectAll(Normal normal) {
        return normalMapper.selectAll(normal);
    }

    @Override
    public Normal selectById(Long id) {
        return normalMapper.selectById(id);
    }

    @Override
    public Boolean create(Normal normal) {
        return normalMapper.insert(normal) == 1;
    }

    @Override
    public Boolean update(Normal normal) {
        return normalMapper.update(normal) == 1;
    }

    @Override
    public Boolean deleteById(Long id) {
        return normalMapper.deleteById(id) == 1;
    }
}
